package Observer;

/**
 * @className: notifyMain
 * @Auther: jiesen.liu
 * @Date: 2019/7/22 17:41
 * @package: Observer
 */
public class notifyMain {

    public static void main(String[] args) {
        ObServerUser user = new WXObserver();
        user.setName("user");
        ObServerUser user1 = new WXObserver();
        user1.setName("user1");
        ObServerUser user2 = new WXObserver();
        user2.setName("user2");
        WXNotify notify = new WXNotify();
        notify.addNotify(user);
        notify.addNotify(user2);
        notify.addNotify(user1);
        notify.notifyAll("hello");
    }
}
